package com.medical.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.medical.mapper.HospitalberthMapper;
import com.medical.mapper.HospitalberthMapperCustom;
import com.medical.po.HospitalberthCustom;
import com.medical.service.HospitalBerthService;

/** 
* @author  LTT-AH-ZY
* @date 创建时间：2017年8月15日 下午12:59:06 
* @version 1.0 
* @parameter 参数及其意义
* @since 最早使用该方法/类/接口的JDK版本 
* @since  
* @return  
*/

public class HospitalBerthServiceImpl implements HospitalBerthService{
	@Autowired
	private HospitalberthMapperCustom hospitalberthMapperCustom;
	@Autowired
	private HospitalberthMapper hospitalberthMapper;
	@Override
	public List<HospitalberthCustom> findhospitalberthList(HospitalberthCustom hospitalberthCustom) throws Exception {
		// select list from table hospitalberth by id 
		return hospitalberthMapperCustom.findhospitalberthList(hospitalberthCustom);
	}
	@Override
	public int insertSelectiveReturnID(HospitalberthCustom hospitalberthCustom) throws Exception {
		// insert into table hospitalberth
		return hospitalberthMapperCustom.insertSelectiveReturnID(hospitalberthCustom);
	}
	@Override
	public int deleteHospitalberth(Integer hospberthid) throws Exception {
		// delete by id from table hospitalberth
		return hospitalberthMapper.deleteByPrimaryKey(hospberthid);
	}
	@Override
	public int CheckdeptberthEmpty(HospitalberthCustom hospitalberthCustom) throws Exception {
		// count by hospdeptname
		return hospitalberthMapperCustom.CheckdeptberthEmpty(hospitalberthCustom);
	}

}
